package com.qk.management.mapper;
import com.qk.entity.Dept;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 部门管理数据层Mapper接口
 */

@Mapper
public interface DeptMapper {
    @Insert("insert into dept(name,status,create_time,update_time) values(#{name},#{status},#{createTime},#{updateTime})")
    void insert(Dept dept);



    @Select("select * from dept where id=#{id}")
    Dept selectId(Integer id);

    void updateDept(Dept dept);

    List<Dept> list(String name, Integer status);

    @Delete("delete from dept where id=#{id}")
    void deleteDept(Integer id);
}
